package main

import (
	"day12_10_homework/config"
	"day12_10_homework/models/mysql"
	"day12_10_homework/models/redis"
	"day12_10_homework/routers"
	"github.com/gin-gonic/gin"
)

func main() {
	server := gin.Default()
	//动态配置
	config.Init()
	//数据库连接
	mysql.MySQLInit()
	//redis连接
	redis.RedisInit()
	//路由
	routers.SetUserRouters(server)
	routers.SetVideoRouters(server)
	//监听端口
	server.Run(":" + config.AppConfig.GinConfig.Run)
}
